import { Col, Row } from 'antd';
import React, { CSSProperties } from 'react';
import styles from './index.module.less';

interface ToolbarProps {
  leftRender?: React.ReactNode
  rightRender?: React.ReactNode
  children?: React.ReactNode
  style?:CSSProperties | undefined;
}

const Toolbar = ({
  leftRender,
  style,
  children, rightRender }: ToolbarProps) => {
  return (<div className={styles.toolbarWrapper} style={style}>
    <Row>
      <Col  span={8}>{leftRender}</Col>
      <Col   span={8}> {children}</Col>
      <Col style={{textAlign:'right',paddingRight:10}}  span={8}>{rightRender}</Col>
    </Row>

   
  </div>)
}
export default Toolbar